import useRoute from "@/hooks/useRoute";
import { routeChange } from "@/utils/microUtils";
import { Button, Space } from "antd";

export default function List() {

  const { goto } = useRoute();

  return <div>
    crm系统-客户列表 <br /><br />
    <Space>
      {/* 1. 子应用内部跳转 */}
      <Button
        onClick={() => {
          // 使主应用菜单高亮
          routeChange('/opt/set');
          // 子应用内部跳转
          goto('/set');
        }}
      >去opt设置页</Button>

      {/* 2. 跳转到主应用 */}
      <Button onClick={() => routeChange('/system/role')}>去主应用的角色管理</Button>

      {/* 3. 跳转到子应用b */}
      <Button onClick={() => routeChange('/opt/set')}>去opt-set页</Button>
    </Space>

  </div>;
}
